package com.sky.service.user;

import com.sky.dto.ShoppingCartDTO;
import com.sky.pojo.ShoppingCart;
import com.sky.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface ShoppingCartService {



    /**
     * 添加购物车
     * @param shoppingCartDTO
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    void add(ShoppingCartDTO shoppingCartDTO);

    /**
     * 查看购物车
     * @return 购物车的菜品或者套餐数据
     */
    List<ShoppingCart> list();

    /**
     * 清空购物车
     */
    void clean();
}
